import { getCategoryAPI } from "@/apis/layout";
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useCategoryStore = defineStore('category', () => {
    // 首页数据的渲染
    const CategoryList = ref([]);
    //请求首页数据
    const getCategory = async () => {
        const res = await getCategoryAPI();
        CategoryList.value = res.result;
    };
    return { 
        CategoryList, getCategory 
    }
})
